package com.pro.service.imple;
//部门信息 业务层
import com.pro.mapper.JsDeptMapper;
import com.pro.pojo.JsDept;
import com.pro.service.JsDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JsDeptServiceImple implements JsDeptService {

    @Autowired
    private JsDeptMapper jsDeptMapper;
    //根据登陆人id查询登陆人所在部门
    @Override
    public List<JsDept> getSyJsDeptByCurrentUser(Integer account) {
        return jsDeptMapper.getSyJsDeptByCurrentUser(account);
    }

    @Override
    public List<JsDept> getAllDeptsByNameDateStatus(JsDept jsDept) {
        return jsDeptMapper.getAllDeptsByNameDateStatus(jsDept);
    }

    //根据id更改部门状态
    @Override
    public boolean updateDeptStatus(JsDept jsDept) {
        return jsDeptMapper.updateDeptStatus(jsDept);
    }

    //根据id删除当前部门
    @Override
    public boolean delCurrentDeptTable(Integer id) {
        return jsDeptMapper.delCurrentDeptTable(id);
    }

    //根据id更改部门信息
    @Override
    public boolean updateDeptMessage(JsDept jsDept) {
        return jsDeptMapper.updateDeptMessage(jsDept);
    }

    @Override
    public boolean addDept(JsDept jsDept) {
        return jsDeptMapper.addDept(jsDept);
    }

    @Override
    public List<JsDept> getDepts() {
        return jsDeptMapper.getDepts();
    }

    @Override
    public boolean updateDeptNameById(JsDept jsDept) {
        return jsDeptMapper.updateDeptNameById(jsDept);
    }

    @Override
    public boolean deleteDeptById(Integer id) {
        return jsDeptMapper.deleteDeptById(id);
    }


}
